/**
 * 
 */
package truerefactor.output;

import java.io.File;

import truerefactor.graph.CodeGraph;

/**
 * OutputBuilder - Interface describing the necessary public interface of the
 * director a class which is used to provide any type of output from the system.
 * Realizations of this interface are used by the OutputDirector.
 * 
 * @author Isaac Griffith
 */
public interface OutputBuilder {

    /**
     * Sets the code graph which will be used to generate output form.
     * 
     * @param graph
     *            current codegraph from which output is derived
     */
    void setCodeGraph(CodeGraph graph);

    /**
     * Generates the packages for output
     */
    void createPackages();

    /**
     * Generates the classes in output
     */
    void createClasses();

    /**
     * Creates the attributes in each class for output
     */
    void createAttributes();

    /**
     * Creates the methods in each class for output
     */
    void createMethods();

    /**
     * Used to create links between classes (mainly for UML)
     */
    void createLinksBetweenClasses();

    /**
     * Actually generates the necessary files
     * 
     * @param fileLoc
     *            location of the file
     * @param comment
     *            a comment for the file
     */
    void createOutputFiles(File fileLoc, String comment);

    /**
     * @return the file object of the resulting files (directory if multiple
     *         files result)
     */
    File getResult();
}
